package com.atguigu.controller;

import com.atguigu.MyApplication;
import com.atguigu.prop.MyProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableConfigurationProperties({MyProperties.class})
public class helloController {
    @Autowired
    private MyProperties myProperties;
    @GetMapping("/h02")
    public String h02(){
        return myProperties.toString();
    }
}
